package medallia;

public class LosDeMedalliaSonTodosPutos {
	
	public static void main(String[] args){
		//System.out.println(longestPalindrome("111133311"));
		System.out.println(mult(3,3));
	}
	
	public static Integer mult(Integer x, Integer y){
		Integer res = 0;
		for(;x > 0; x--) res += y;
		return res;
	}
	
	public static String longestPalindrome(String s){
		String rev = "";
		for(int i = s.length()-1; i>=0; i--) rev += s.charAt(i);
		
		String[][] sm = new String[s.length()+1][rev.length()+1];
		for(int i = 0; i < s.length()+1; i++){
			for(int j = 0; j < rev.length()+1; j++){
				sm[i][j] = "";
			}
		}
	       
	       for(int i = 1; i < sm[0].length; i++){
			for(int j = 1; j < sm.length; j++){
				if(s.charAt(i-1) == rev.charAt(j-1)){
					sm[i][j] = sm[i-1][j-1] + s.charAt(i-1);
				}else{ 
					if(sm[i-1][j].length() < sm[i][j-1].length()){
						sm[i][j] = sm[i][j-1];
					}else{
						sm[i][j] = sm[i-1][j];
					}
				}
			}
		}
		return sm[s.length()][rev.length()];
	}

}
